import request from "../utils/request";
//登录接口
const Login = () => {
    return request({
        url:"/login",
        method:"post",
        data:{
            account:"xiaotuxian001",
            password:"123456"
        }
    })
}

//导航条数据
const categoryList = () => {
    return request({
        url: '/home/category/head',
        method: 'get',
        params:{}
    })
}
//导航所有数据All
const categoryAllList = (id) => {
    return request({
        url: '/category',
        method: 'get',
        params: {
            id
        }
    })
}
//导航页banner数据
const bannerList = () => {
    return request({
        url: '/home/banner',
        method: 'get',
        params:{}
    })
}
/* 获取nav那页nav数据 */
const getNav = (num) => {
    return request({
        url:"/category/sub/filter",
        method:"get",
        params:{
            id:num
        }
    })
}
/* 点击nav元素获取数据 */
const getNavLi = (data) => {
    return request({
        url:"/category/goods/temporary",
        method:"post",
        data
    })
}
export default {
    categoryList,
    categoryAllList,
    bannerList,
    Login,
    getNav,
    getNavLi,
}